3.1.84 \(\int \frac {x \log (e (\frac {a+b x}{c+d x})^n)}{f+g x+h x^2} \, dx\) [84]

Optimal. Leaf size=685 \[ -\frac {g \tanh ^{-1}\left (\frac {g+2 h x}{\sqrt {g^2-4 f h}}\right ) \left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right )}{h \sqrt {g^2-4 f h}}+\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \log \left (f+g x+h x^2\right )}{2 h}+\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (a+b x)}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (a+b x)}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (c+d x)}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (c+d x)}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h} \]

[Out]

-1/2*(n*ln(b*x+a)-ln(e*((b*x+a)/(d*x+c))^n)-n*ln(d*x+c))*ln(h*x^2+g*x+f)/h+1/2*n*ln(b*x+a)*ln(-b*(g+2*h*x-(-4*
f*h+g^2)^(1/2))/(2*a*h-b*(g-(-4*f*h+g^2)^(1/2))))*(1-g/(-4*f*h+g^2)^(1/2))/h-1/2*n*ln(d*x+c)*ln(-d*(g+2*h*x-(-
4*f*h+g^2)^(1/2))/(2*c*h-d*(g-(-4*f*h+g^2)^(1/2))))*(1-g/(-4*f*h+g^2)^(1/2))/h+1/2*n*polylog(2,2*h*(b*x+a)/(2*
a*h-b*(g-(-4*f*h+g^2)^(1/2))))*(1-g/(-4*f*h+g^2)^(1/2))/h-1/2*n*polylog(2,2*h*(d*x+c)/(2*c*h-d*(g-(-4*f*h+g^2)
^(1/2))))*(1-g/(-4*f*h+g^2)^(1/2))/h+1/2*n*ln(b*x+a)*ln(-b*(g+2*h*x+(-4*f*h+g^2)^(1/2))/(2*a*h-b*(g+(-4*f*h+g^
2)^(1/2))))*(1+g/(-4*f*h+g^2)^(1/2))/h-1/2*n*ln(d*x+c)*ln(-d*(g+2*h*x+(-4*f*h+g^2)^(1/2))/(2*c*h-d*(g+(-4*f*h+
g^2)^(1/2))))*(1+g/(-4*f*h+g^2)^(1/2))/h+1/2*n*polylog(2,2*h*(b*x+a)/(2*a*h-b*(g+(-4*f*h+g^2)^(1/2))))*(1+g/(-
4*f*h+g^2)^(1/2))/h-1/2*n*polylog(2,2*h*(d*x+c)/(2*c*h-d*(g+(-4*f*h+g^2)^(1/2))))*(1+g/(-4*f*h+g^2)^(1/2))/h-g
*arctanh((2*h*x+g)/(-4*f*h+g^2)^(1/2))*(n*ln(b*x+a)-ln(e*((b*x+a)/(d*x+c))^n)-n*ln(d*x+c))/h/(-4*f*h+g^2)^(1/2
)

________________________________________________________________________________________

Rubi [A]
time = 0.49, antiderivative size = 685, normalized size of antiderivative = 1.00, number of steps used = 21, number of rules used = 9, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.281, Rules used = {2593, 2465, 2441, 2440, 2438, 648, 632, 212, 642} \begin {gather*} \frac {n \left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) \text {PolyLog}\left (2,\frac {2 h (a+b x)}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {n \left (\frac {g}{\sqrt {g^2-4 f h}}+1\right ) \text {PolyLog}\left (2,\frac {2 h (a+b x)}{2 a h-b \left (\sqrt {g^2-4 f h}+g\right )}\right )}{2 h}-\frac {n \left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) \text {PolyLog}\left (2,\frac {2 h (c+d x)}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {n \left (\frac {g}{\sqrt {g^2-4 f h}}+1\right ) \text {PolyLog}\left (2,\frac {2 h (c+d x)}{2 c h-d \left (\sqrt {g^2-4 f h}+g\right )}\right )}{2 h}-\frac {g \tanh ^{-1}\left (\frac {g+2 h x}{\sqrt {g^2-4 f h}}\right ) \left (-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+n \log (a+b x)-n \log (c+d x)\right )}{h \sqrt {g^2-4 f h}}-\frac {\log \left (f+g x+h x^2\right ) \left (-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+n \log (a+b x)-n \log (c+d x)\right )}{2 h}+\frac {n \left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) \log (a+b x) \log \left (-\frac {b \left (-\sqrt {g^2-4 f h}+g+2 h x\right )}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {n \left (\frac {g}{\sqrt {g^2-4 f h}}+1\right ) \log (a+b x) \log \left (-\frac {b \left (\sqrt {g^2-4 f h}+g+2 h x\right )}{2 a h-b \left (\sqrt {g^2-4 f h}+g\right )}\right )}{2 h}-\frac {n \left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) \log (c+d x) \log \left (-\frac {d \left (-\sqrt {g^2-4 f h}+g+2 h x\right )}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {n \left (\frac {g}{\sqrt {g^2-4 f h}}+1\right ) \log (c+d x) \log \left (-\frac {d \left (\sqrt {g^2-4 f h}+g+2 h x\right )}{2 c h-d \left (\sqrt {g^2-4 f h}+g\right )}\right )}{2 h} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*Log[e*((a + b*x)/(c + d*x))^n])/(f + g*x + h*x^2),x]

[Out]

-((g*ArcTanh[(g + 2*h*x)/Sqrt[g^2 - 4*f*h]]*(n*Log[a + b*x] - Log[e*((a + b*x)/(c + d*x))^n] - n*Log[c + d*x])
)/(h*Sqrt[g^2 - 4*f*h])) + ((1 - g/Sqrt[g^2 - 4*f*h])*n*Log[a + b*x]*Log[-((b*(g - Sqrt[g^2 - 4*f*h] + 2*h*x))
/(2*a*h - b*(g - Sqrt[g^2 - 4*f*h])))])/(2*h) - ((1 - g/Sqrt[g^2 - 4*f*h])*n*Log[c + d*x]*Log[-((d*(g - Sqrt[g
^2 - 4*f*h] + 2*h*x))/(2*c*h - d*(g - Sqrt[g^2 - 4*f*h])))])/(2*h) + ((1 + g/Sqrt[g^2 - 4*f*h])*n*Log[a + b*x]
*Log[-((b*(g + Sqrt[g^2 - 4*f*h] + 2*h*x))/(2*a*h - b*(g + Sqrt[g^2 - 4*f*h])))])/(2*h) - ((1 + g/Sqrt[g^2 - 4
*f*h])*n*Log[c + d*x]*Log[-((d*(g + Sqrt[g^2 - 4*f*h] + 2*h*x))/(2*c*h - d*(g + Sqrt[g^2 - 4*f*h])))])/(2*h) -
 ((n*Log[a + b*x] - Log[e*((a + b*x)/(c + d*x))^n] - n*Log[c + d*x])*Log[f + g*x + h*x^2])/(2*h) + ((1 - g/Sqr
t[g^2 - 4*f*h])*n*PolyLog[2, (2*h*(a + b*x))/(2*a*h - b*(g - Sqrt[g^2 - 4*f*h]))])/(2*h) + ((1 + g/Sqrt[g^2 -
4*f*h])*n*PolyLog[2, (2*h*(a + b*x))/(2*a*h - b*(g + Sqrt[g^2 - 4*f*h]))])/(2*h) - ((1 - g/Sqrt[g^2 - 4*f*h])*
n*PolyLog[2, (2*h*(c + d*x))/(2*c*h - d*(g - Sqrt[g^2 - 4*f*h]))])/(2*h) - ((1 + g/Sqrt[g^2 - 4*f*h])*n*PolyLo
g[2, (2*h*(c + d*x))/(2*c*h - d*(g + Sqrt[g^2 - 4*f*h]))])/(2*h)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2465

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2593

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]*(RFx_.), x_Symbol] :> Dist[
p*r, Int[RFx*Log[a + b*x], x], x] + (Dist[q*r, Int[RFx*Log[c + d*x], x], x] - Dist[p*r*Log[a + b*x] + q*r*Log[
c + d*x] - Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r], Int[RFx, x], x]) /; FreeQ[{a, b, c, d, e, f, p, q, r}, x] &&
RationalFunctionQ[RFx, x] && NeQ[b*c - a*d, 0] &&  !MatchQ[RFx, (u_.)*(a + b*x)^(m_.)*(c + d*x)^(n_.) /; Integ
ersQ[m, n]]

Rubi steps

\begin {align*} \int \frac {x \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx &=n \int \frac {x \log (a+b x)}{f+g x+h x^2} \, dx-n \int \frac {x \log (c+d x)}{f+g x+h x^2} \, dx-\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \int \frac {x}{f+g x+h x^2} \, dx\\ &=n \int \left (\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) \log (a+b x)}{g-\sqrt {g^2-4 f h}+2 h x}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) \log (a+b x)}{g+\sqrt {g^2-4 f h}+2 h x}\right ) \, dx-n \int \left (\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) \log (c+d x)}{g-\sqrt {g^2-4 f h}+2 h x}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) \log (c+d x)}{g+\sqrt {g^2-4 f h}+2 h x}\right ) \, dx-\frac {\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \int \frac {g+2 h x}{f+g x+h x^2} \, dx}{2 h}-\frac {\left (g \left (-n \log (a+b x)+\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+n \log (c+d x)\right )\right ) \int \frac {1}{f+g x+h x^2} \, dx}{2 h}\\ &=-\frac {\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \log \left (f+g x+h x^2\right )}{2 h}+\left (\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log (a+b x)}{g-\sqrt {g^2-4 f h}+2 h x} \, dx-\left (\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log (c+d x)}{g-\sqrt {g^2-4 f h}+2 h x} \, dx+\left (\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log (a+b x)}{g+\sqrt {g^2-4 f h}+2 h x} \, dx-\left (\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log (c+d x)}{g+\sqrt {g^2-4 f h}+2 h x} \, dx+\frac {\left (g \left (-n \log (a+b x)+\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+n \log (c+d x)\right )\right ) \text {Subst}\left (\int \frac {1}{g^2-4 f h-x^2} \, dx,x,g+2 h x\right )}{h}\\ &=-\frac {g \tanh ^{-1}\left (\frac {g+2 h x}{\sqrt {g^2-4 f h}}\right ) \left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right )}{h \sqrt {g^2-4 f h}}+\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \log \left (f+g x+h x^2\right )}{2 h}-\frac {\left (b \left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log \left (\frac {b \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{-2 a h+b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{a+b x} \, dx}{2 h}+\frac {\left (d \left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log \left (\frac {d \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{-2 c h+d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{c+d x} \, dx}{2 h}-\frac {\left (b \left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log \left (\frac {b \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{-2 a h+b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{a+b x} \, dx}{2 h}+\frac {\left (d \left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \int \frac {\log \left (\frac {d \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{-2 c h+d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{c+d x} \, dx}{2 h}\\ &=-\frac {g \tanh ^{-1}\left (\frac {g+2 h x}{\sqrt {g^2-4 f h}}\right ) \left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right )}{h \sqrt {g^2-4 f h}}+\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \log \left (f+g x+h x^2\right )}{2 h}-\frac {\left (\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 h x}{-2 a h+b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{x} \, dx,x,a+b x\right )}{2 h}+\frac {\left (\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 h x}{-2 c h+d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{x} \, dx,x,c+d x\right )}{2 h}-\frac {\left (\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 h x}{-2 a h+b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{x} \, dx,x,a+b x\right )}{2 h}+\frac {\left (\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 h x}{-2 c h+d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{x} \, dx,x,c+d x\right )}{2 h}\\ &=-\frac {g \tanh ^{-1}\left (\frac {g+2 h x}{\sqrt {g^2-4 f h}}\right ) \left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right )}{h \sqrt {g^2-4 f h}}+\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g-\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (a+b x) \log \left (-\frac {b \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \log (c+d x) \log \left (-\frac {d \left (g+\sqrt {g^2-4 f h}+2 h x\right )}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (n \log (a+b x)-\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log (c+d x)\right ) \log \left (f+g x+h x^2\right )}{2 h}+\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (a+b x)}{2 a h-b \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}+\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (a+b x)}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1-\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (c+d x)}{2 c h-d \left (g-\sqrt {g^2-4 f h}\right )}\right )}{2 h}-\frac {\left (1+\frac {g}{\sqrt {g^2-4 f h}}\right ) n \text {Li}_2\left (\frac {2 h (c+d x)}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )}{2 h}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.77, size = 669, normalized size = 0.98 \begin {gather*} \frac {-\frac {2 g \tan ^{-1}\left (\frac {g+2 h x}{\sqrt {-g^2+4 f h}}\right ) \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )}{\sqrt {-g^2+4 f h}}+\left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right ) \log (f+x (g+h x))+\frac {n \left (\log \left (\frac {a}{b}+x\right )-\log \left (\frac {c}{d}+x\right )-\log \left (\frac {a+b x}{c+d x}\right )\right ) \left (2 g \tan ^{-1}\left (\frac {g+2 h x}{\sqrt {-g^2+4 f h}}\right )-\sqrt {-g^2+4 f h} \log (f+x (g+h x))\right )}{\sqrt {-g^2+4 f h}}+\frac {\left (-g+\sqrt {g^2-4 f h}\right ) n \left (\log \left (\frac {a}{b}+x\right ) \log \left (1-\frac {2 h (a+b x)}{2 a h+b \left (-g+\sqrt {g^2-4 f h}\right )}\right )+\text {Li}_2\left (\frac {2 h (a+b x)}{2 a h+b \left (-g+\sqrt {g^2-4 f h}\right )}\right )\right )}{\sqrt {g^2-4 f h}}+\frac {\left (g+\sqrt {g^2-4 f h}\right ) n \left (\log \left (\frac {a}{b}+x\right ) \log \left (1+\frac {2 h (a+b x)}{-2 a h+b \left (g+\sqrt {g^2-4 f h}\right )}\right )+\text {Li}_2\left (\frac {2 h (a+b x)}{2 a h-b \left (g+\sqrt {g^2-4 f h}\right )}\right )\right )}{\sqrt {g^2-4 f h}}-\frac {\left (-g+\sqrt {g^2-4 f h}\right ) n \left (\log \left (\frac {c}{d}+x\right ) \log \left (1-\frac {2 h (c+d x)}{2 c h+d \left (-g+\sqrt {g^2-4 f h}\right )}\right )+\text {Li}_2\left (\frac {2 h (c+d x)}{2 c h+d \left (-g+\sqrt {g^2-4 f h}\right )}\right )\right )}{\sqrt {g^2-4 f h}}-\frac {\left (g+\sqrt {g^2-4 f h}\right ) n \left (\log \left (\frac {c}{d}+x\right ) \log \left (1+\frac {2 h (c+d x)}{-2 c h+d \left (g+\sqrt {g^2-4 f h}\right )}\right )+\text {Li}_2\left (\frac {2 h (c+d x)}{2 c h-d \left (g+\sqrt {g^2-4 f h}\right )}\right )\right )}{\sqrt {g^2-4 f h}}}{2 h} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*Log[e*((a + b*x)/(c + d*x))^n])/(f + g*x + h*x^2),x]

[Out]

((-2*g*ArcTan[(g + 2*h*x)/Sqrt[-g^2 + 4*f*h]]*(Log[e*((a + b*x)/(c + d*x))^n] - n*Log[(a + b*x)/(c + d*x)]))/S
qrt[-g^2 + 4*f*h] + (Log[e*((a + b*x)/(c + d*x))^n] - n*Log[(a + b*x)/(c + d*x)])*Log[f + x*(g + h*x)] + (n*(L
og[a/b + x] - Log[c/d + x] - Log[(a + b*x)/(c + d*x)])*(2*g*ArcTan[(g + 2*h*x)/Sqrt[-g^2 + 4*f*h]] - Sqrt[-g^2
 + 4*f*h]*Log[f + x*(g + h*x)]))/Sqrt[-g^2 + 4*f*h] + ((-g + Sqrt[g^2 - 4*f*h])*n*(Log[a/b + x]*Log[1 - (2*h*(
a + b*x))/(2*a*h + b*(-g + Sqrt[g^2 - 4*f*h]))] + PolyLog[2, (2*h*(a + b*x))/(2*a*h + b*(-g + Sqrt[g^2 - 4*f*h
]))]))/Sqrt[g^2 - 4*f*h] + ((g + Sqrt[g^2 - 4*f*h])*n*(Log[a/b + x]*Log[1 + (2*h*(a + b*x))/(-2*a*h + b*(g + S
qrt[g^2 - 4*f*h]))] + PolyLog[2, (2*h*(a + b*x))/(2*a*h - b*(g + Sqrt[g^2 - 4*f*h]))]))/Sqrt[g^2 - 4*f*h] - ((
-g + Sqrt[g^2 - 4*f*h])*n*(Log[c/d + x]*Log[1 - (2*h*(c + d*x))/(2*c*h + d*(-g + Sqrt[g^2 - 4*f*h]))] + PolyLo
g[2, (2*h*(c + d*x))/(2*c*h + d*(-g + Sqrt[g^2 - 4*f*h]))]))/Sqrt[g^2 - 4*f*h] - ((g + Sqrt[g^2 - 4*f*h])*n*(L
og[c/d + x]*Log[1 + (2*h*(c + d*x))/(-2*c*h + d*(g + Sqrt[g^2 - 4*f*h]))] + PolyLog[2, (2*h*(c + d*x))/(2*c*h
- d*(g + Sqrt[g^2 - 4*f*h]))]))/Sqrt[g^2 - 4*f*h])/(2*h)

________________________________________________________________________________________

Maple [F]
time = 0.53, size = 0, normalized size = 0.00 \[\int \frac {x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )}{h \,x^{2}+g x +f}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*ln(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x)

[Out]

int(x*ln(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x)

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*log(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*f*h-g^2>0)', see `assume?` f
or more deta

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*log(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x, algorithm="fricas")

[Out]

integral(x*log(((b*x + a)/(d*x + c))^n*e)/(h*x^2 + g*x + f), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*ln(e*((b*x+a)/(d*x+c))**n)/(h*x**2+g*x+f),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*log(e*((b*x+a)/(d*x+c))^n)/(h*x^2+g*x+f),x, algorithm="giac")

[Out]

integrate(x*log(((b*x + a)/(d*x + c))^n*e)/(h*x^2 + g*x + f), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{h\,x^2+g\,x+f} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*log(e*((a + b*x)/(c + d*x))^n))/(f + g*x + h*x^2),x)

[Out]

int((x*log(e*((a + b*x)/(c + d*x))^n))/(f + g*x + h*x^2), x)

________________________________________________________________________________________